/**
 * 
 */
package com.maohi.software.arii.enumerations;

import com.maohi.software.arii.interfaces.Parameter;

/**
 * @author heifara
 * 
 */
public enum AriiParameter implements Parameter {

	/**
	 * The plugin directory
	 */
	PLUGIN_DIRECTORY("arii.plugin.directory", "./plugins"),

	/**
	 * The library directory
	 */
	LIBRARY_DIRECTORY("arii.library.directory", "./lib"),

	/**
	 * The config directory
	 */
	CONFIG_DIRECTORY("arii.config.directory", "./config"),

	/**
	 * The directory log
	 */
	LOG_DIRECTORY("arii.log.directory", "./log"),

	/**
	 * The tmp directory
	 */
	TMP_DIRECTORY("arii.tmp.directory", "./tmp"),

	/**
	 * log4j.property
	 */
	LOG4J_FILE("arii.log4j.file", CONFIG_DIRECTORY.value() + "/log4j.properties");

	private String parameter;
	private String defaultValue;

	private AriiParameter(String aParameter, String aDefaultValue) {
		this.parameter = aParameter;
		this.defaultValue = aDefaultValue;
	}

	@Override
	public String parameter() {
		return this.parameter;
	}

	@Override
	public String value() {
		return System.getProperty(this.parameter, this.defaultValue);
	}
}
